Connect the "destroy" signal so that the 'window' pointer is set back to
authorRyan Lortie <desrt@desrt.ca>
Fri, 29 Jun 2007 16:02:24 +0000 (16:02 +0000)
committerRyan Lortie <ryanl@src.gnome.org>
Fri, 29 Jun 2007 16:02:24 +0000 (16:02 +0000)
2007-06-29  Ryan Lortie  <desrt@desrt.ca>

        * tests/testgtk.c (create_composited_window): Connect the "destroy"
        signal so that the 'window' pointer is set back to NULL (like for the
        other examples).

        * gdk/x11/gdkwindow-x11.c (gdk_window_impl_x11_finalize): Don't
        destroy the Damage here.  By finalize() XDestroyWindow has already
        been called (and took the Damage with it).

        Bug #452046.

svn path=/trunk/; revision=18290

ChangeLog
gdk/x11/gdkwindow-x11.c
tests/testgtk.c

index 71c470870555a504ec1c980a4703b90a5b7a3cd9..fda592a9cb598c336215261c893ea1ecb9f2df3d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2007-06-29  Ryan Lortie  <desrt@desrt.ca>
+
+       * tests/testgtk.c (create_composited_window): Connect the "destroy"
+       signal so that the 'window' pointer is set back to NULL (like for the
+       other examples).
+
+       * gdk/x11/gdkwindow-x11.c (gdk_window_impl_x11_finalize): Don't
+       destroy the Damage here.  By finalize() XDestroyWindow has already
+       been called (and took the Damage with it).
+
+       Bug #452046.
+
 2007-06-29  Emmanuele Bassi  <ebassi@gnome.org>
 
        * gtk/gtkrecentchooserdefault.c (recent_meta_data_func): Escape
index 068959689d2e9934f6f9923259d125c6503813cb..045e5a037409bb85b36e79b6db433f8f479ac541 100644 (file)
@@ -197,14 +197,6 @@ gdk_window_impl_x11_finalize (GObject *object)
 
   _gdk_xgrab_check_destroy (GDK_WINDOW (wrapper));
 
-#if defined(HAVE_XCOMPOSITE) && defined(HAVE_XDAMAGE) && defined (HAVE_XFIXES)
-  if (window_impl->damage != None)
-  {
-    XDamageDestroy (GDK_WINDOW_XDISPLAY (object), window_impl->damage);
-    window_impl->damage = None;
-  }
-#endif
-
   if (!GDK_WINDOW_DESTROYED (wrapper))
     {
       GdkDisplay *display = GDK_WINDOW_DISPLAY (wrapper);
index be779a8791d5a9f76964e4a0f3e1d2a4a3d133de..079bb14f91708f6443da52613f5a75127e830453 100644 (file)
@@ -514,6 +514,10 @@ create_composited_window (GtkWidget *widget)
       event = gtk_event_box_new ();
       window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
 
+      g_signal_connect (window, "destroy",
+                        G_CALLBACK (gtk_widget_destroyed),
+                        &window);
+
       /* put a red background on the window */
       gdk_color_parse ("red", &red);
       gtk_widget_modify_bg (window, GTK_STATE_NORMAL, &red);
@@ -1261,7 +1265,7 @@ create_button_box (GtkWidget *widget)
     g_signal_connect (window, "destroy",
                      G_CALLBACK (gtk_widget_destroyed),
                      &window);
-    
+
     gtk_container_set_border_width (GTK_CONTAINER (window), 10);
 
     main_vbox = gtk_vbox_new (FALSE, 0);